package com.chhh.cranelease.controller;

import com.chhh.cranelease.entity.CarState;
import com.chhh.cranelease.model.ResponseCode;
import com.chhh.cranelease.service.CarStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("carState/")
public class CarStateController {
    @Autowired
    private CarStateService service;
    @RequestMapping("selectAll")
    public ResponseCode selectAll(){
        List<CarState> list=service.selectAll();
        ResponseCode responseData=new ResponseCode();
        responseData.setErrorCode(0);
        responseData.setObjectList(list);
        return responseData;
    }
}
